package com.stormrage.entity.edu.rep;

import java.io.Serializable;

import com.stormrage.entity.edu.EduModule;

public class EduModuleRep implements Serializable {

	// ------------------------------- Fields -------------------------------

	private static final long serialVersionUID = 6533904881516164953L;

	// ------------------------------- Fields -------------------------------

	private Integer seq;

	private Integer id;

	private Integer viewId;

	private String module;

	private Integer ness;

	private String nessStr;

	private Integer count;

	// ------------------------------- Fields -------------------------------

	public EduModuleRep() {
	}

	// ------------------------------- Fields -------------------------------

	public Integer getSeq() {
		return seq;
	}

	public void setSeq(Integer seq) {
		this.seq = seq;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getViewId() {
		return viewId;
	}

	public void setViewId(Integer viewId) {
		this.viewId = viewId;
	}

	public String getModule() {
		return module;
	}

	public void setModule(String module) {
		this.module = module;
	}

	public Integer getNess() {
		return ness;
	}

	public void setNess(Integer ness) {
		this.ness = ness;
	}

	public String getNessStr() {
		return nessStr;
	}

	public void setNessStr(String nessStr) {
		this.nessStr = nessStr;
	}

	public Integer getCount() {
		return count;
	}

	public void setCount(Integer count) {
		this.count = count;
	}

	// ------------------------------- Fields -------------------------------

	public static EduModuleRep instance(EduModule arg0, Integer arg1, Integer arg2) {
		EduModuleRep entity = new EduModuleRep();
		entity.setSeq(arg1);
		entity.setId(arg0.getId());
		entity.setModule(arg0.getModule());
		if (null == arg0.getNess())
			entity.setNessStr("无");
		if (null != arg0.getNess() && arg0.getNess().equals(0))
			entity.setNessStr("必修");
		if (null != arg0.getNess() && arg0.getNess().equals(1))
			entity.setNessStr("选修");
		entity.setCount(arg2);
		return entity;
	}

	public static EduModuleRep instance(EduModuleRep arg0, Integer arg1, Integer arg2) {
		arg0.setSeq(arg1);
		arg0.setCount(arg2);
		if (null == arg0.getNess())
			arg0.setNessStr("无");
		if (null != arg0.getNess() && arg0.getNess().equals(0))
			arg0.setNessStr("必修");
		if (null != arg0.getNess() && arg0.getNess().equals(1))
			arg0.setNessStr("选修");
		return arg0;
	}

	@Override
	public String toString() {
		return this.getClass() + " : id - " + id + " viewId - " + viewId + " module - " + module + " ness - " + ness
				+ " count - " + count;
	}

}
